/**
 * Project: springyounger.lottery.web
 * 
 * File Created at 2010-3-21
 * $Id$
 * 
 * Copyright 2009 Zjut Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Zjut Edu. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Zjut Edu.
 */
package com.springyouner.lottery.admin;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

/**
 * 注销
 * 
 * @author springyounger
 */
public class SingoffController implements Controller {

	private static final Logger logger = LoggerFactory
			.getLogger(SingoffController.class);

	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		request.getSession().removeAttribute("userSession");
		request.getSession().removeAttribute("phaseId");
		request.getSession().invalidate();

		logger.info("用户注销 ");
		return new ModelAndView("redirect:index.do");
		// response.sendRedirect("/lottery/");
		// return null;
	}

}
